package com.superme.ResConsumerServiceByribbon.configure;


import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.stereotype.Component;

@EnableAutoConfiguration
@Component
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {


    @Override
    public void configure(WebSecurity web) throws Exception {
        super.configure(web);
        web.ignoring().antMatchers(HttpMethod.GET, "/health", "/info","/hystrix/**",
                "/hystrix.stream*","/metrics","/metrics/**",
                "/metrics.json","/hystrix.stream/**");
        //web.ignoring().antMatchers(HttpMethod.GET, "/health", "/info");
    }


}
